<template>
  <div>
    <div class="share-popup-box">
      <div
        class="share-popup"
      >
        <div class="top-tip">
          温馨提示
        </div>
        <div class="popup-info">
          <div
            class="share-tip"
          >
            您还未报名班级，分享无法获得佣金
          </div>
          <div class="bottom">
            <van-button
              size="small"
              type="primary"
              class="btn btn-login"
              @click="onShare"
            >
              分享
            </van-button>
            <van-button
              size="small"
              type="primary"
              class="btn btn-sign-up"
              @click="onSignUp"
            >
              报名
            </van-button>
          </div>
          <div class="bottom-prompt">
            技术支持：会考吧平台
          </div>
        </div>
      </div>
      <img
        src="~assets/home/close.png"
        class="close-btn"
        @click="closePopup"
      >
    </div>
    <div
      class="share-mask"
      @click="closePopup"
    />
  </div>
</template>
<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
  props: {
    isDistribution: {
      type: Boolean,
      default: false,
    },
    isScholarInst: {
      type: Boolean,
      default: false,
    },
  },
  data () {
    return {
      show: true,
    }
  },
  methods: {
    // 登录
    onShare () {
      this.$emit('share', true)
    },
    // 看课
    onSignUp () {
      this.$emit('signUp', true)
    },
    // 关闭弹窗
    closePopup () {
      console.log('点击')
      this.$emit('closeSharePopup', true)
    },
  },
})
</script>
<style lang="scss" scoped>
.share-popup-box {
  z-index: 2003;
  width: 100%;
  text-align: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate3d(-50%,-50%,0);
}
.share-popup {
  margin: 0 24px;
  margin: auto;
  border-radius:3px;
  text-align: center;
  width: calc(100% - 80px);
  background-color: #fff;
}
.share-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2002;
  background-color: rgba(0,0,0,0.7);
}
.top-tip {
  height: 114px;
  color: #333;
  font-size: 36px;
  font-weight: 600;
  line-height: 114px;
  @include px1border(bottom, #E9E9E9);
}
.popup-info {
  font-size: 36px;
  padding: 80px 0 30px;
}
.share-tip {
  color: #333;
  font-size: 30px;
  margin-bottom: 30px;
}
.bottom {
  margin: 80px 0 60px;
}
.btn {
  width: 266px;
  height: 70px;
  @include px1border(all, $primary-web);
  border-radius: 3px;
  &.van-button--small {
    font-size: 36px;
  }
}
.btn-login {
  color: $primary-web;
  margin-right: 50px;
  background-color: #fff;
}
.bottom-prompt {
  font-size: 24px;
  color: #999;
}
.close-btn {
  width: 60px;
  height: 60px;
  margin-top: 100px;
}
</style>
